package com.scy.common;

/**
 * 本类用来演示
 *
 * @author wwh
 * @date 2024/6/26 11:42 $
 */
public class Result {
    private int code;

    private String msg;

    private Object data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static Result ok(String msg, Object data){
        Result result = new Result();

        result.code = 200;

        result.msg = msg;
        result.data = data;

        return result;

    }

    public static Result noOk(String msg){
        Result result = new Result();

        result.code = 500;

        result.msg = msg;

        return result;

    }
}
